<template>
  <div class="managebox">
    <el-row>
      <el-col :span="6"><div class="grid-content bg-purple right">姓名：</div></el-col>
      <el-col :span="18"><div class="grid-content bg-purple-light">{{data.commingName || data.nickName}}</div></el-col>
    </el-row>
    <el-row>
      <el-col :span="6"><div class="grid-content bg-purple right">性别：</div></el-col>
      <el-col :span="18">
        <div class="grid-content bg-purple-light">
          <template v-if="data.sex===1">男</template>
          <template v-else-if="data.sex===2">女</template>
        </div>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="6"><div class="grid-content bg-purple right">证件号码：</div></el-col>
      <el-col :span="18"><div class="grid-content bg-purple-light">{{data.idNo}}</div></el-col>
    </el-row>
    <el-row>
      <el-col :span="6"><div class="grid-content bg-purple right">手机：</div></el-col>
      <el-col :span="18"><div class="grid-content bg-purple-light">{{data.linkPhone}}</div></el-col>
    </el-row>
    <el-row>
      <el-col :span="6"><div class="grid-content bg-purple right">出生日期：</div></el-col>
      <el-col :span="18">
        <div class="grid-content bg-purple-light">
        <!--{{Number.isInteger(data.birthdayStr) ? new Date(data.birthdayStr).format(): ''}}-->
        {{data.birthdayStr == null ? '' : data.birthdayStr}}
        </div>
      </el-col>
    </el-row>
    <el-row v-if="showChannel">
      <el-col :span="6"><div class="grid-content bg-purple right">渠道：</div></el-col>
      <el-col :span="18"><div class="grid-content bg-purple-light">{{data.lotteryChannels}}</div></el-col>
    </el-row>
    <el-row v-for="field in data.matchIpSignExts" :key="field.id">
      <el-col :span="6"><div class="grid-content bg-purple right">{{field.fieldText}}：</div></el-col>
      <el-col :span="18"><div class="grid-content bg-purple-light">{{field.fieldValue}}</div></el-col>
    </el-row>           
  </div>
</template>

<script>
export default {
  props: {
    data: {
      type: Object,
      default: {}
    },
    showChannel: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {}
  }
}
</script>

<style>

</style>
